<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>欢迎来到微工匠</title>
</head>
<body style="padding-top: 12%; background:url('/imgs/index.jpg')">

<div style="text-align: center;" id="count_div">
    <label for="count"></label>
    <span id="count" style="font-weight: bold;font-family: Consolas; font-size: 300%;color: white;"></span>
</div>
<div style="text-align: center">
    <span style="text-align: center;font-family: Consolas;font-size: 500%;font-weight: bold; color: red; " >欢 迎 来 到 微 工 匠</span>
</div>


</body>
<script type="text/javascript">
        var delayTime = 30;
        window.setTimeout(function () {
            counting();
        },500);
        
        function counting() {
            window.setInterval(function () {
                delayTime--;
                document.getElementById("count").innerHTML = timeNow();
                if (delayTime == 0){
                    location.href = '/mof';
                }
            },1000)
        }
        function timeNow() {
            var date = new Date();
            var Y = date.getFullYear() + "-";
            var M = check(date.getMonth() + 1) + "-";
            var D = check(date.getDate()) + " ";
            var H = check(date.getHours()) + ":";
            var m = check(date.getMinutes()) + ":";
            var s = check(date.getSeconds());
            return Y + M + D + H + m + s;
        }

        //检查是不是两位数字，不足补全
        function check(str) {
            str = str.toString();
            if (str.length < 2) {
                str = '0' + str;
            }
            return str;
        }
</script>
</html>